extends "../../azurlane_ctrl/AzurItem.gd"
func init():
	.init()
	name = "[稀有]治愈系猫爪"
	info = "佩戴者造成治疗时，使被治疗目标获得20%减伤，持续3秒(不可叠加，乘算)\n[color=#DC143C]同时装备两件时可升级[/color]"
	price = 300
	att.atk = 50
	att.maxHp = 500
	att.healHpL = 0.3
	
func _connect():
	._connect()
	masCha.connect("healCha", self, "healCha")

func healCha(cha):
	if cha.hasBuff("b_al_catPaw") == null:
		cha.addBuff(b_al_catPaw.new(3))

class b_al_catPaw:
	extends "../../azurlane_ctrl/AzurBuff.gd"
	func _init(lv = 1):
		attInit()
		id = "b_al_catPaw"
		life = lv
		buffName = "猫爪·减伤"
	func _connect():
		masCha.connect("onHurt",self,"run")
	func run(atkInfo):
		atkInfo.hurtVal *= 0.8
		
func upgrade():
	name = "[color=#FFFF00][史诗]治愈系猫爪"
	info = "佩戴者造成治疗时，使被治疗目标获得20%减伤，持续3秒(不可叠加，乘算)"
	att.atk = 100
	att.maxHp = 1000
	att.healHpL = 0.6